package com.wq.ui;

import com.wq.biz.Dice;
import com.wq.biz.Manager;
import com.wq.ui.coms.BasicArtButton;
import com.wq.ui.coms.BasicMenuPane;
import com.wq.ui.coms.ImageGet;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

/**
 * @author wq
 * 2020/12/19 - 18:30
 */
@RequiredArgsConstructor(onConstructor_ = {@Autowired})
@Component
public class MainFrame extends JFrame {
    static int num = 4;

    private final MainPanel mainPanel;

    private final StartPanel startPanel;

    private final RulePanel rulePanel;

    private final GamePanel gamePanel;

    public void init() {
        setBounds(400, 100, 1000, 800);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLayout(null);
        setResizable(false);

        Manager.getManager().iniChessPane(gamePanel);





        rulePanel.setButtonLink(0, mainPanel);


        add(mainPanel);
        add(startPanel);
        add(rulePanel);
        add(gamePanel);

        setVisible(true);
    }
}
